package com.dly.hope.modle;

import lombok.Data;
import org.hibernate.annotations.Comment;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * @author linyu.dai
 * @project myserve
 * @description 账号 角色表
 * @creat 2022/10/9 17:05:45
 */
@Entity
@Table(name = "hope006_account_role")
@DynamicInsert
@DynamicUpdate

@Data
public class AccountRole extends BaseEntity{

    @Id
    @Column(name = "id")
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "org.hibernate.id.UUIDGenerator")
    private String id;

    @Column(name = "account_id")
    @Comment(value = "账号id")
    private String accountId;

    @Column(name = "role_id")
    @Comment(value = "角色id")
    private String roleId;
}
